**Going Feminine Replication Data 




use HouseCand_merge.dta


label var female_cand "Female Candidate"
label var democrat "Democratic Candidate"
label var incumbent "Incumbent"
label var open_seat "Open Seat Election"
label var compete "Competitive Election"
label var mixed_gender "Male v. Female Races" 
label var per_mm "Market Pop."
label var log_campaign_funds "Campaign Funds"
label var log_ad_cost "Ad Cost"
label var state_ideo "State Ideology"
label var promote "Promotion Ads"
label var attack "Attack Ads"
label var contrastad "Contrast Ads"
label var total_ads "Total Ads"
label var mas_prop "Proportion Masculine Trait Ads"
label var fem_prop "Proportion Feminine Trait Ads"
label var femmas_diffprop "Trait Balance Scores"
label var year "Election Year"
label var fem_prop_opponent "Proportion Opponent Feminine Trait Ads"
label var mas_prop_opponent "Proportion Opponent Masculine Trait Ads"
label var femtrait_attacked "Proportion Opponent Feminine Trait Critical Ads"
label var mastrait_attacked "Proportion Opponent Masculine Trait Critical Ads"
label var college "College Degrees"
label var diverse "District Diversity"
label var women_gov "Women in State Government"
label var unemp_prop "District Unemployment"
label var urbanpop "District Urban"
label var femgov "Female Governor"
label var per_mm "Media Market Population"
label var log_campaign_funds "Campagin Funds, Logged"
label var log_ad_cost "Advertising Cost in Media Market, Logged"
label var issue_mas_prop "Proportion Masculine Issue Ads"
label var issue_fem_prop "Proportion Feminine Issue Ads"
label var hill_primary "States HRC Won Primary"
label var stat_dist "FIPS State and Congressional District"

**Analyses for Figure 1, Table A6 in the appendix

regress fem_prop female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  mas_prop total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress fem_prop female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  mas_prop total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress fem_prop female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  mas_prop total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)


regress mas_prop female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop ///
promote attack contrastad  fem_prop total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress mas_prop female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop ///
promote attack contrastad  fem_prop total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress mas_prop female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop ///
promote attack contrastad  fem_prop total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)

**Basic t-test comparisons of trait-balance scores at start of Trait-balancing section
ttest femmas_diffprop if year==2000, by(female_cand)
ttest femmas_diffprop if year==2004, by(female_cand)
ttest femmas_diffprop if year==2008, by(female_cand)

**Analyses for Figure 2 & Table A7
regress femmas_diffprop  female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  women_gov unemp_prop urbanpop ///
promote attack contrastad total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress femmas_diffprop  female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  women_gov unemp_prop urbanpop ///
promote attack contrastad total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress femmas_diffprop  female_cand##democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  women_gov unemp_prop urbanpop ///
promote attack contrastad total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)

**Table A8, trait balance scores, only female candidates
regress femmas_diffprop  democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  women_gov unemp_prop urbanpop ///
promote attack contrastad total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if female_cand==1&year==2000, cluster(stat_dist)

regress femmas_diffprop  democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  women_gov unemp_prop urbanpop ///
promote attack contrastad total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if female_cand==1&year==2004, cluster(stat_dist)

regress femmas_diffprop  democrat##incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  women_gov unemp_prop urbanpop ///
promote attack contrastad total_ads fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if female_cand==1&year==2008, cluster(stat_dist)


**Correlations between Trait Balance Scores and Issues, Table A14

pwcorr femmas_diffprop  issue_fem_prop if female_cand==1&year==2000, sig
pwcorr femmas_diffprop  issue_fem_prop if female_cand==0&year==2000, sig
pwcorr  femmas_diffprop issue_mas_prop if female_cand==1&year==2000, sig
pwcorr  femmas_diffprop issue_mas_prop if female_cand==0&year==2000, sig
pwcorr fem_prop issue_fem_prop  if female_cand==1&year==2000, sig
pwcorr fem_prop issue_fem_prop  if female_cand==0&year==2000, sig
pwcorr fem_prop issue_mas_prop if female_cand==1&year==2000, sig
pwcorr fem_prop issue_mas_prop if female_cand==0&year==2000, sig
pwcorr mas_prop issue_fem_prop if female_cand==1&year==2000, sig
pwcorr mas_prop issue_fem_prop if female_cand==0&year==2000, sig
pwcorr mas_prop issue_mas_prop if female_cand==1&year==2000, sig
pwcorr mas_prop issue_mas_prop if female_cand==0&year==2000, sig

pwcorr femmas_diffprop  issue_fem_prop if female_cand==1&year==2004, sig
pwcorr femmas_diffprop  issue_fem_prop if female_cand==0&year==2004, sig
pwcorr  femmas_diffprop issue_mas_prop if female_cand==1&year==2004, sig
pwcorr  femmas_diffprop issue_mas_prop if female_cand==0&year==2004, sig
pwcorr fem_prop issue_fem_prop  if female_cand==1&year==2004, sig
pwcorr fem_prop issue_fem_prop  if female_cand==0&year==2004, sig
pwcorr fem_prop issue_mas_prop if female_cand==1&year==2004, sig
pwcorr fem_prop issue_mas_prop if female_cand==0&year==2004, sig
pwcorr mas_prop issue_fem_prop if female_cand==1&year==2004, sig
pwcorr mas_prop issue_fem_prop if female_cand==0&year==2004, sig
pwcorr mas_prop issue_mas_prop if female_cand==1&year==2004, sig
pwcorr mas_prop issue_mas_prop if female_cand==0&year==2004, sig

pwcorr femmas_diffprop  issue_fem_prop if female_cand==1&year==2008, sig
pwcorr femmas_diffprop  issue_fem_prop if female_cand==0&year==2008, sig
pwcorr  femmas_diffprop issue_mas_prop if female_cand==1&year==2008, sig
pwcorr  femmas_diffprop issue_mas_prop if female_cand==0&year==2008, sig
pwcorr fem_prop issue_fem_prop  if female_cand==1&year==2008, sig
pwcorr fem_prop issue_fem_prop  if female_cand==0&year==2008, sig
pwcorr fem_prop issue_mas_prop if female_cand==1&year==2008, sig
pwcorr fem_prop issue_mas_prop if female_cand==0&year==2008, sig
pwcorr mas_prop issue_fem_prop if female_cand==1&year==2008, sig
pwcorr mas_prop issue_fem_prop if female_cand==0&year==2008, sig
pwcorr mas_prop issue_mas_prop if female_cand==1&year==2008, sig
pwcorr mas_prop issue_mas_prop if female_cand==0&year==2008, sig


**Feminine Issue Analyses for Figure 3 & Table A15

regress femmas_diffprop  female_cand##c.issue_fem_prop democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.issue_fem_prop democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.issue_fem_prop democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)

**Masculine issue effect, Table A15
regress femmas_diffprop  female_cand##c.issue_mas_prop democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.issue_mas_prop democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.issue_mas_prop democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad  total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)


**Women's Representation on Trait Balancing, Table A16
regress femmas_diffprop  female_cand##femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress femmas_diffprop  female_cand##femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress femmas_diffprop  female_cand##femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse women_gov unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.women_gov femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2000, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.women_gov femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2004, cluster(stat_dist)

regress femmas_diffprop  female_cand##c.women_gov femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)

**Clinton primary effect for just 2008,Table A17

regress femmas_diffprop  female_cand##hill_primary women_gov femgov   democrat incumbent open_seat compete mixed_gender per_mm ///
log_campaign_funds log_ad_cost state_ideo college diverse  unemp_prop urbanpop  ///
promote attack contrastad   total_ads  fem_prop_opponent mas_prop_opponent ///
femtrait_attacked mastrait_attacked if year==2008, cluster(stat_dist)


**Times series analyses

label var femmas_diffprop "Trait Balance Scores"
label var male_mas_prop_opponent "Positive Masculine Trait Ads, by Male Opponents"
label var male_fem_prop_opponent "Positive Feminine Trait Ads, by Male Opponents"
label var female_fem_prop_opponent "Positive Feminine Trait Ads, by Female Candidates"
label var female_mas_prop_opponent "Positive Masculine Trait Ads, by Female Candidates"
label var male_mas_attack_prop "Attack Masculine Trait Ads, by Male Opponents"
label var male_fem_attack_prop "Attack Feminine Trait Ads, by Male Opponents"
label var female_mas_attack_prop "Attack Masculine Trait Ads, by Female Candidates"
label var female_fem_attack_prop "Attack Feminine Trait Ads, by Female Candidates"
label var cand_num "Unique Numeric Candidate Identifier"
label var week "Weeks away from the Election"
label var statdist "FIPS State and Congressional District"

**there are 3 seperate data files for each year: HouseCand2000_time.dta, 
**HouseCand2004_time.dta, HouseCand2008_time.dta

**note the attack trait variables are not in the 2008 dataset. See paper.

**Analyses for Table 4 in main paper, and Table A9 & A10 in appendix

xtset week cand_num
set matsize 5000

**Male opponents using positive traits to describe themselves 
qui sureg(femmas_diffprop L1.femmas_diffprop L1.male_fem_prop_opponent L1.male_mas_prop_opponent dum1-dum432 , noconstant) ///
(male_fem_prop_opponent L1.male_fem_prop_opponent L1.femmas_diffprop L1.male_mas_prop_opponent dum1-dum432 , noconstant) ///
(male_mas_prop_opponent L1.male_fem_prop_opponent L1.femmas_diffprop L1.male_mas_prop_opponent dum1-dum432 , noconstant)
est table, keep(L1.femmas_diffprop L1.male_fem_prop_opponent L1.male_mas_prop_opponent) b star

**Male opponents attacking feamle candidates with gendered traits
qui sureg(femmas_diffprop L1.femmas_diffprop L1.male_fem_attack_prop L1.male_mas_attack_prop dum1-dum432 , noconstant) ///
(male_fem_attack_prop L1.male_fem_attack_prop L1.femmas_diffprop L1.male_mas_attack_prop dum1-dum432 , noconstant) ///
(male_mas_attack_prop L1.male_fem_attack_prop L1.femmas_diffprop L1.male_mas_attack_prop dum1-dum432 , noconstant)
est table, keep(L1.femmas_diffprop L1.male_fem_attack_prop L1.male_mas_attack_prop) b star

**Table A11 in appendix
**Female candidates using positive traits to describe themselves
set matsize 5000
qui sureg(femmas_diffprop L1.femmas_diffprop L1.female_fem_prop_opponent L1.female_mas_prop_opponent dum1-dum432 , noconstant) ///
(male_fem_prop_opponent L1.female_fem_prop_opponent L1.femmas_diffprop L1.female_mas_prop_opponent dum1-dum432 , noconstant) ///
(male_mas_prop_opponent L1.female_fem_prop_opponent L1.femmas_diffprop L1.female_mas_prop_opponent dum1-dum432 , noconstant)
est table, keep(L1.femmas_diffprop L1.female_fem_prop_opponent L1.female_mas_prop_opponent) b 

qui sureg(femmas_diffprop L1.femmas_diffprop L1.female_fem_attack_prop L1.female_mas_attack_prop dum1-dum432 , noconstant) ///
(female_fem_attack_prop L1.female_fem_attack_prop L1.femmas_diffprop L1.female_mas_attack_prop dum1-dum432 , noconstant) ///
(female_mas_attack_prop L1.female_fem_attack_prop L1.femmas_diffprop L1.female_mas_attack_prop dum1-dum432 , noconstant)
est table, keep(L1.femmas_diffprop L1.female_fem_attack_prop L1.female_mas_attack_prop) b star
